Without limiting the scope of the invention, its background is described in connection with transfer of control and argument passing between processes in computer systems, as an example.
Heretofore, in this field, whenever one program seeks to call an entry point in another program, such as a Terminate and Stay Resident (TSR) program, either both programs must reside in code segments for the same operating mode, or if the two programs reside in mode segments for different operating modes, a mode switch is necessary.
Both of these options are undesirable. The former, because the TSR program may be somehow related to another piece of equipment, but should be generic as to programs which are to call entry points in the TSR program. For example, if a communications driver is a TSR program which provides communication between application programs and a graphics system, and applications programs can be written in Real mode, Virtual mode and Protected mode on an Intel 80386 microprocessor, then, with the restriction that both programs operate in the same mode, there would have to be a separate and distinct communications driver TSR program for each of those modes.
However, mode switches are also undesirable. A mode switch entails changing a bit in a control register. In a mode switch to return from protected mode to real mode, the program must ensure that paging is done correctly, and it transfers control to a segment with a 64K limit. Furthermore, to safely accomplish the mode switch interrupts must be disabled, and later re-enabled, before and after the transfer of control. It is estimated that a mode switch operation presently consumes 100 micro-seconds or more. For application programs that draw complicated graphics, thousands of mode switches may be required for one picture, and would negatively impact performance. Also, there can be a limitation on the address space available to the real mode program.